#include "xtypes.h"
#include "util_sync.h"











CxCriticalSectionDaemon::CxCriticalSectionDaemon( CxCriticalSection * _pCriticalSection ) : m_pCriticalSection(_pCriticalSection)
{
	if( m_pCriticalSection!=NULL )
		m_pCriticalSection->Enter();
}


CxCriticalSectionDaemon::~CxCriticalSectionDaemon()
{
	if( m_pCriticalSection!=NULL )
		m_pCriticalSection->Leave();
}






void CxMultiThreadLock::Lock()
{
	Enter();
}

void CxMultiThreadLock::Unlock()
{
	Leave();
}